
snippet loop
 <?php if (have_posts()) : ?>
	   <?php while (have_posts()) : the_post(); ?>    
	   ${1:// todo}
	   <?php endwhile; ?>
 <?php endif; ?>
endsnippet

snippet loop_get_posts
<?php global $post; 
	$args = array(${1:'category' => -9}); // exclude category 9
	$custom_posts = get_posts($args);
	foreach($custom_posts as $post) : setup_postdata($post);?>
	   ${2:// todo}
<?php endforeach; ?>
endsnippet

snippet loop_wp_query
<?php $result = new WP_Query(${1:cat=-9});
	while($result->have_posts()) : $result->the_post(); ?>
	   ${2:// todo}
	<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
endsnippet

snippet loop_query_posts
<?php global $query_string;
	query_posts( $query_string.${1:$args} );?>
	 <?php if (have_posts()) : ?>
		   <?php while (have_posts()) : the_post(); ?>    
		   ${2:// todo}
		   <?php endwhile; ?>
	 <?php endif; ?>
<?php wp_reset_query(); ?>
endsnippet
